<template>
<div class="demo">
  <div>
    <page :pageCount="pageCount"  :currentPage="currentPage" v-on:change="pagingChanged"></page>
  </div>
</div>
</template>

<script>
export default {
  data() {
    return {
      pageCount: 10,
      currentPage: 1
    }
  },
  methods: {
    pagingChanged(page) {
      page = page < 1 ? 1 : page
      this.currentPage = page
      this.reloadList()
    },
    reloadList() {
      console.log("data init")
    }
  },
}
</script>

<style>
.demo {
  padding: 10px;
}
</style>
